﻿Imports DotNetNuke.Entities.Content
Imports DotNetNuke.Entities.Content.Common

Friend Class Terms
    Implements iTerms(Of Contact)

    Private ReadOnly lDotNetNukeTermController As iDotNetNukeTermController

#Region "---ManageContactTerms---"
    Public Sub ManageContactTerms(obj As Contact, objContent As ContentItem) Implements iTerms(Of DotNetNuke.Modules.GeminorumSoftwareContacts.Contact).ManageContactTerms
        RemoveContactTerms(objContent)

        For Each term In obj.Terms
            lDotNetNukeTermController.AddTermToContent(term, objContent)
        Next
    End Sub
#End Region
#Region "---RemoveContactTerms---"
    Public Sub RemoveContactTerms(objContent As ContentItem) Implements iTerms(Of DotNetNuke.Modules.GeminorumSoftwareContacts.Contact).RemoveContactTerms
        lDotNetNukeTermController.RemoveTermsFromContent(objContent)
    End Sub
#End Region

    Sub New(DotNetNukeTermController As iDotNetNukeTermController)
        lDotNetNukeTermController = DotNetNukeTermController
    End Sub
End Class